package it.javaweb.dao.jdbc;

import it.javaweb.beans.Materia;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

public class MateriaRowMapper implements ParameterizedRowMapper<Materia> {

	@Override
	public Materia mapRow(ResultSet rs, int rowNumber) throws SQLException {
		
		Materia materia = new Materia();		
		materia.setID(rs.getInt("ID"));
		materia.setDescrizione(rs.getString("descrizione"));
		return materia;
	}

}

